//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package org.jim.core.packets;

import org.jim.core.ImStatus;
import org.jim.core.Status;

public class JoinGroupRespBody extends RespBody {
	private static final long serialVersionUID = 6635620192752369689L;
	public JoinGroupResult result;
	public String groupId;

	public JoinGroupRespBody() {
		this((Command)Command.COMMAND_JOIN_GROUP_RESP, (Status)null);
	}

	public JoinGroupRespBody(Integer code, String msg) {
		super(code, msg);
		this.command = Command.COMMAND_JOIN_GROUP_RESP;
	}

	public JoinGroupRespBody(Status status) {
		this(Command.COMMAND_JOIN_GROUP_RESP, status);
	}

	public JoinGroupRespBody(Command command, Status status) {
		super(command, status);
	}

	public JoinGroupResult getResult() {
		return this.result;
	}

	public JoinGroupRespBody setResult(JoinGroupResult result) {
		this.result = result;
		return this;
	}

	public String getGroupId() {
		return this.groupId;
	}

	public JoinGroupRespBody setGroupId(String groupId) {
		this.groupId = groupId;
		return this;
	}

	public JoinGroupRespBody setData(Object data) {
		super.setData(data);
		return this;
	}

	public static JoinGroupRespBody success() {
		JoinGroupRespBody joinGroupRespBody = new JoinGroupRespBody(ImStatus.C10011);
		joinGroupRespBody.setResult(JoinGroupResult.JOIN_GROUP_RESULT_OK);
		return joinGroupRespBody;
	}

	public static JoinGroupRespBody failed() {
		JoinGroupRespBody joinGroupRespBody = new JoinGroupRespBody(ImStatus.C10012);
		joinGroupRespBody.setResult(JoinGroupResult.JOIN_GROUP_RESULT_UNKNOWN);
		return joinGroupRespBody;
	}
}
